﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;

using FXnaInfrastructure;

using FXnaGis;


namespace ASWPF
{
    /// <summary>
    /// winPsList.xaml 的交互逻辑
    /// </summary>
    public partial class winPsList : Window
    {
        public winPsList(FVectorLayer layer)
        {
            InitializeComponent();

            this._psLayer = layer;


            foreach (FShape shp in this._psLayer.Shapes.Values)
            {
                this._shapes.Add((FShape)shp.Clone ());

            }

            this.dgList.ItemsSource = this._shapes;


           


        }

        FVectorLayer _psLayer;

        List<FShape> _shapes = new List<FShape>();

        public List<FShape> Shapes
        {
            get { return _shapes; }
            set { _shapes = value; }
        }

        private void btnOk_Click(object sender, RoutedEventArgs e)
        {
            this.DialogResult = true;
            this.Close();
        }




      

    }
}
